#include <gcode.h>
◆ checkAndPushCommand()
| void GCode::checkAndPushCommand |
( |
| ) |
|
|
protected |
Check if result is plausible. If it is, an ok is send and the command is stored in queue. If not, a resend and ok is send.
◆ computeBinarySize()
| uint8_t GCode::computeBinarySize |
( |
char * |
ptr | ) |
|
|
static |
Computes size of binary data from bitfield.
In the repetier-protocol in binary mode, the first 2 uint8_ts define the data. From this bitfield, this function computes the size of the command including the 2 uint8_ts of the bitfield and the 2 uint8_ts for the checksum.
Gcode Letter to Bit and Datatype:
- N : Bit 0 : 16-Bit Integer
- M : Bit 1 : 8-Bit unsigned uint8_t
- G : Bit 2 : 8-Bit unsigned uint8_t
- X : Bit 3 : 32-Bit Float
- Y : Bit 4 : 32-Bit Float
- Z : Bit 5 : 32-Bit Float
- E : Bit 6 : 32-Bit Float
- : Bit 7 : always set to distinguish binary from ASCII line.
- F : Bit 8 : 32-Bit Float
- T : Bit 9 : 8 Bit Integer
- S : Bit 10 : 32 Bit Value
- P : Bit 11 : 32 Bit Integer
- V2 : Bit 12 : Version 2 command for additional commands/sizes
- Ext : Bit 13 : There are 2 more uint8_ts following with Bits, only for future versions
- Int :Bit 14 : Marks it as internal command,
- Text : Bit 15 : 16 Byte ASCII String terminated with 0 Second word if V2:
- I : Bit 0 : 32-Bit float
- J : Bit 1 : 32-Bit float
- R : Bit 2 : 32-Bit float
- D : Bit 3 : 32-Bit float
- C : Bit 4 : 32-Bit float
- H : Bit 5 : 32-Bit float
- A : Bit 6 : 32-Bit float
- B : Bit 7 : 32-Bit float
- K : Bit 8 : 32-Bit float
- L : Bit 9 : 32-Bit float
- O : Bit 0 : 32-Bit float
◆ debugCommandBuffer()
| void GCode::debugCommandBuffer |
( |
| ) |
|
|
protected |
◆ echoCommand()
| void GCode::echoCommand |
( |
| ) |
|
◆ executeFString()
Execute commands in progmem stored string. Multiple commands are separated by
Used to execute memory stored parts called from gcodes. For new commands use the flash sender instead.
◆ fatalError()
◆ FSTRINGPARAM()
| static GCode::FSTRINGPARAM |
( |
fatalErrorMsg |
| ) |
|
|
static |
◆ getP()
| long GCode::getP |
( |
long |
def | ) |
|
|
inline |
◆ getS()
| long GCode::getS |
( |
long |
def | ) |
|
|
inline |
◆ hasA()
◆ hasB()
◆ hasC()
◆ hasD()
◆ hasE()
◆ hasF()
◆ hasFatalError()
| static bool GCode::hasFatalError |
( |
| ) |
|
|
inlinestatic |
◆ hasFormatError()
| bool GCode::hasFormatError |
( |
| ) |
|
|
inline |
◆ hasG()
◆ hasH()
◆ hasI()
◆ hasJ()
◆ hasK()
◆ hasL()
◆ hasM()
◆ hasN()
◆ hasNoXYZ()
◆ hasO()
◆ hasP()
◆ hasR()
◆ hasS()
◆ hasString()
| bool GCode::hasString |
( |
| ) |
|
|
inline |
◆ hasT()
◆ hasX()
◆ hasY()
◆ hasZ()
◆ isV2()
◆ keepAlive()
◆ parseAscii()
| bool GCode::parseAscii |
( |
char * |
line, |
|
|
bool |
fromSerial |
|
) |
| |
Converts a ASCII GCode line into a GCode structure.
◆ parseBinary()
| bool GCode::parseBinary |
( |
uint8_t * |
buffer, |
|
|
bool |
fromSerial |
|
) |
| |
Converts a binary uint8_tfield containing one GCode line into a GCode structure. Returns true if checksum was correct.
◆ parseFloatValue()
| float GCode::parseFloatValue |
( |
char * |
s | ) |
|
|
inlineprotected |
◆ parseLongValue()
| long GCode::parseLongValue |
( |
char * |
s | ) |
|
|
inlineprotected |
◆ peekCurrentCommand()
| GCode * GCode::peekCurrentCommand |
( |
| ) |
|
|
static |
Get next command in command buffer. After the command is processed, call gcode_command_finished()
Get the next buffered command. Returns 0 if no more commands are buffered. For each returned command, the gcode_command_finished() function must be called.
◆ popCurrentCommand()
| void GCode::popCurrentCommand |
( |
| ) |
|
Removes the last returned command from cache.
◆ printCommand()
| void GCode::printCommand |
( |
| ) |
|
Print command on serial console.
◆ pushCommand()
| void GCode::pushCommand |
( |
| ) |
|
|
static |
◆ readFromSerial()
| void GCode::readFromSerial |
( |
| ) |
|
|
static |
Read from serial console or sd card.
Frees the cache used by the last command fetched.
This function is the main function to read the commands from serial console or from sd card. It must be called frequently to empty the incoming buffer.
◆ reportFatalError()
| void GCode::reportFatalError |
( |
| ) |
|
|
static |
◆ requestResend()
| void GCode::requestResend |
( |
| ) |
|
|
staticprotected |
◆ resetFatalError()
| void GCode::resetFatalError |
( |
| ) |
|
|
static |
◆ setFormatError()
| void GCode::setFormatError |
( |
| ) |
|
|
inline |
◆ unsetX()
◆ unsetY()
◆ unsetZ()
◆ GCodeSource
◆ SDCard
◆ UIDisplay
◆ actLineNumber
| uint32_t GCode::actLineNumber |
|
staticprotected |
Line number of current command.
◆ binaryCommandSize
| uint8_t GCode::binaryCommandSize |
|
staticprotected |
Expected size of the incoming binary command.
◆ bufferLength
| volatile uint8_t GCode::bufferLength = 0 |
|
staticprotected |
Number of commands stored in gcode_buffer.
◆ bufferReadIndex
| uint8_t GCode::bufferReadIndex = 0 |
|
staticprotected |
Read position in gcode_buffer.
◆ bufferWriteIndex
| uint8_t GCode::bufferWriteIndex = 0 |
|
staticprotected |
Write position in gcode_buffer.
◆ commandReceiving
| uint8_t GCode::commandReceiving |
|
staticprotected |
Current received command.
◆ commandsBuffered
| GCode GCode::commandsBuffered |
|
staticprotected |
Buffer for received commands.
◆ commandsReceivingWritePosition
| uint8_t GCode::commandsReceivingWritePosition = 0 |
|
staticprotected |
Writing position in gcode_transbuffer.
◆ commentDetected
| uint8_t GCode::commentDetected = false |
|
staticprotected |
Flags true if we are reading the comment part of a command.
◆ formatErrors
| uint8_t GCode::formatErrors = 0 |
|
staticprotected |
Number of sequential format errors.
◆ internalCommand
| bool GCode::internalCommand |
◆ keepAliveInterval
◆ lastBusySignal
When was the last busy signal.
◆ lastLineNumber
| uint32_t GCode::lastLineNumber |
|
staticprotected |
Last line number received.
Line number reduced to 16 bit.
◆ params
◆ params2
◆ sendAsBinary
| uint8_t GCode::sendAsBinary |
|
staticprotected |
Flags the command as binary input.
◆ text
Text message of g-code if present.
◆ timeOfLastDataPacket
Time, when we got the last data packet. Used to detect missing uint8_ts.
◆ waitingForResend
| int8_t GCode::waitingForResend |
|
staticprotected |
Waiting for line to be resend. -1 = no wait.
◆ waitUntilAllCommandsAreParsed
| bool GCode::waitUntilAllCommandsAreParsed = false |
|
staticprotected |
Don't read until all commands are parsed. Needed if gcode_buffer is misused as storage for strings.
◆ wasLastCommandReceivedAsBinary
| uint8_t GCode::wasLastCommandReceivedAsBinary |
|
staticprotected |
Was the last successful command in binary mode?
The documentation for this class was generated from the following files: